<template>
  <div><h1>员工管理</h1>
      <ListEm :cutbean="cutbean"  @findByItem="findByItem" @find="find"></ListEm>
      <AddEm ></AddEm>
      <UpdateEm :emObj="emObj"></UpdateEm>
  </div>
</template>

<script>
import ListEm from "./empages/listEm.vue"
import AddEm from "./empages/AddEm.vue"
import UpdateEm from "./empages/updateEm.vue"
export default {
    components:{ListEm,AddEm,UpdateEm},
        data(){
        return {
           emObj:{},
            cutbean:{}
        }
    },
    methods:{
       async findByItem(param){
           var cutObj = await this.ajax.getSubmit("/project/em/findByItem",param);
           console.log(JSON.stringify(cutObj));
           this.cutbean=cutObj;
        },
        find(em){
            this.emObj = em;
            this.emObj.face="/project/html/image/"+this.emObj.face;
        }
    //    async  findById(id){
    //         alert("父容器"+id);
    //        this.carObj =await this.ajax.getSubmit("/project/car/findById",{id:id});
           
    //     }
    },
    created(){
        this.findByItem({page:1});
    }
}
</script>

<style>

</style>